
<form name="editForm" role="form" novalidate ng-submit="vm.save()">

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="mySweepstakeLabel" data-translate="milkbeeApp.sweepstake.home.createOrEditLabel">Create or edit a Sweepstake</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.sweepstake.id">
            <label for="id" data-translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.sweepstake.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="milkbeeApp.sweepstake.name" for="field_name">Name</label>
            <input type="text" class="form-control" name="name" id="field_name"
                    ng-model="vm.sweepstake.name"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="milkbeeApp.sweepstake.detail" for="field_detail">Detail</label>
            <textarea type="text" class="form-control" name="detail" id="field_detail"
                    ng-model="vm.sweepstake.detail"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="milkbeeApp.sweepstake.startAt" for="field_startAt">Start At</label>
                <div class="input-group">
                    <input id="field_startAt" type="text" class="form-control" name="startAt" datetime-picker="{{dateformat}}" ng-model="vm.sweepstake.startAt" datepicker-options="vm.datepickerOptionsStart" is-open="vm.datePickerOpenStatus.startAt"
                      />
                    <span class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="vm.openCalendar('startAt')"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                </div>
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="milkbeeApp.sweepstake.endAt" for="field_endAt">End At</label>
                <div class="input-group">
                    <input id="field_endAt" type="text" class="form-control" name="endAt" datetime-picker="{{dateformat}}" ng-model="vm.sweepstake.endAt" datepicker-options="vm.datepickerOptionsEnd" is-open="vm.datePickerOpenStatus.endAt"
                      />
                    <span class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="vm.openCalendar('endAt')"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span data-translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span data-translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
